<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ include file="../common/include/header.jsp" %>

<%@ page import="java.util.*,util.*" %>

<div>
<table border="0" cellpadding="0" cellspacing="0" width="980px">
	<tr>
		<td style="vertical-align: top;width: 180px;background-color: #fdb73a;">
			
<!-- Left Menu Including -->
<%@ include file="../common/include/leftmenu.jsp" %>

		</td>
		
		<td style="text-align: center;width: 800px; vertical-align: top;">
		
<!-- 여기서부터 게시판 내용 -->
<div id="noticeMain" style="text-align: center;background-color: #ffffff;">
<html:form action="/noticeboard.do">

<%@include file="logo.jsp" %>

<div class="boardname">공지사항</div>
<table style="width: 700px; text-align: center;" id="nlist">

	<tr><td class="fbviewTD1" style="font-weight: bold;text-align: center;">∴<bean:write name="noticeForm" property="nbtitle"/></td></tr>

	<tr><td class="fbviewTD1" style="text-align: right;">
		<span style="font-size: 8pt;">[<bean:write name="noticeForm" property="rownum"/>]</span>
		<span><a href="javascript:;" onmousedown="popmenu1('<bean:write name="noticeForm" property="mid"/>')" style="color: #2F4F4F;">
		<bean:write name="noticeForm" property="mcnick"/></a></span>
		<span style="font-size: 7pt;color: #aaaaaa;"><bean:write name="noticeForm" property="nbdate"/></span>
		</td></tr>

		
	<tr><td colspan="2"><div id="contents" style="background: #ffffff;text-align: left;padding:10px;border: 1px dotted #bbbbbb;">
	<bean:write name="noticeForm" property="nbcontent"/></div></td></tr>
	
<logic:notEmpty name="noticeForm" property="next">
	<tr><td colspan="2" style="text-align: left;padding-left: 50px;border-top: 1px dotted #dddddd;border-bottom: 1px dotted #dddddd;">
	<a href="noticeboard.do?method=detailView&nbno=<bean:write name="noticeForm" property="next.nbno"/>">
	[다음글]&nbsp;<bean:write name="noticeForm" property="next.nbtitle"/></a>
</logic:notEmpty>
<logic:notEmpty name="noticeForm" property="preview">
	<tr><td colspan="2" style="text-align: left;padding-left: 50px;border-bottom: 1px dotted #dddddd;">
	<a href="noticeboard.do?method=detailView&nbno=<bean:write name="noticeForm" property="preview.nbno"/>">
	[이전글]&nbsp;<bean:write name="noticeForm" property="preview.nbtitle"/></a></td></tr>
</logic:notEmpty>

	<tr><td colspan="2" style="text-align: right;">

<logic:equal value="<%=user.getMid().toLowerCase() %>" name="noticeForm" property="mid">
	<html:link href="javascript:doAction('getForm')"><img src="<%=imagePath %>icon_update.jpg"/></html:link>
	<html:link href="javascript:confirmDelete();"><img src="<%=imagePath %>icon_delete.jpg"/></html:link>	
</logic:equal>
&nbsp;&nbsp;
	<html:link href="javascript:doAction('getList');"><img src="<%=imagePath %>icon_list.jpg"/></html:link>
		</td></tr>


	<tr><td colspan="2">
	
		</td></tr>
</table>
	<input type="hidden" name="method" value=""/>
	<input type="hidden" name="nbno" value="<bean:write name="noticeForm" property="nbno"/>"/>
	<input type="hidden" name="cono" value="<bean:write name="noticeForm" property="cono"/>"/>
	<input type="hidden" name="nbtitle" value="<bean:write name="noticeForm" property="nbtitle"/>"/>
	<input type="hidden" name="nbdate" value="<bean:write name="noticeForm" property="nbdate"/>"/>
	<input type="hidden" name="nbsdate" value="<bean:write name="noticeForm" property="nbsdate"/>"/>
	<input type="hidden" name="nbcontent" value="<bean:write name="noticeForm" property="nbcontent"/>"/>
	<input type="hidden" name="currentPage" value="<bean:write name="pager" property="currentPage"/>"/>
</html:form>
</div>

<script type="text/javascript">
	function confirmDelete(){
		var sure = window.confirm("삭제하겠습니까?");
		if(sure==true) doAction('delete');
	}
	
	function doAction(m){	
		var method = document.getElementById('method');
		method.value = m;
		noticeForm.submit();
	}
	function getBoard(u,b){
		var url = u;
		url = url + escape(encodeURIComponent(b));
		location.href=url;
	}	
	

// 게시물 내용 태그 처리부분
	window.attachEvent("onload",convert);
	
	function convert(){
		var content = document.getElementById('contents').innerHTML;
		
		content = content.replace(/&lt;/g,"<");
		content = content.replace(/&gt;/g,">");
		content = content.replace(/&amp;/g,"&");
		content = content.replace(/&nbsp;/g," ");
		content = content.replace(/&quot;/g,"\"");
		
		document.getElementById('contents').innerHTML = content;
	}

</script>

		</td>		
	</tr>
</table>
</div>

<%@ include file="../common/include/footer.jsp" %>